<template>
    <van-tabbar 
        v-model="active"
        active-color="#ff5f16" 
        inactive-color="#999"
        route
    >
        <van-tabbar-item  
            v-for="(l,i) in navdata" 
            :key="i" 
            :to="{name:l.name}"
            :badge="l.hot?cartNum:null"
        >
            <span>{{l.text}}</span>
            <template #icon>
                <i class="iconfont icons"  :class="l.icon"></i>
            </template>
        </van-tabbar-item>
    </van-tabbar>
</template>

<script>
export default {
    data(){
        return {
            active:''
        }
    }
}
</script>

<style lang="scss" scoped>
.icons{
    font-size: 20px;
}
</style>